#!/bin/bash
#java
func() {
    curl -s 127.0.0.1:80/actuator/health | grep -v DOWN | grep UP >/dev/null 2>&1
    if [ $? -eq 0 ]; then
        curl http://cgi-server/form.cgi?action=controller &
        status=true &
        host=127.0.0.1 &
        project=hcw-project
    fi

}
i=600
while true; do
    if [ $i -eq 0 ]; then
        break

    fi
    func
    i=$((i + 1))

done
